home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
basic
/
pbasmlib.zip
/
PBADEMO3.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-02-12
|
1KB
|
40 lines
$string 32
$link "pbasmlib.pbl"
$include "pbasmlib.inc"
'PBASMLIB Sound Module Demo of SBPLAYFILE and SBPLAYSTRING -
'playback of digitized sample data - requires RIFF.RAW, a raw
'sample file included with PBASMLIB.
'
'Note: If you can't get this to make any sound, you may need
'to change the SB's base port setting (default=220h). To do
'this, use SBSETBASE &h240, or whatever the base port setting is.
wr$="riff.raw"
if dir$(wr$)="" then
line input "Path to riff.raw: ";pth$
if right$(pth$,1)<>"\" then pth$=pth$+"\"
wr$=pth$+wr$
end if
sbreset
for t%=35 to 20 step -5
sbplayfile wr$,t% 'Play the entire file at varying speeds
sbdelay 200
next t%
if dir$(wr$)="" then end 'Quit if file not found
open "b",#1,wr$ 'Open file for binary access
get$ 1,400,a$ 'Throw away first 400 bytes
get$ 1,3000,a$ 'Get 3000 byte portion
seek 1,1
get$ 1,18250,b$ 'Get 18K portion
close 1
for t%=1 to 4
sbplaystring a$,15 'Play 3000-byte portion 4 times
next t%
sbplayfile wr$,15 'Play the entire file again
sbdelay 100
sbplaystring b$,15 'Play the 18K portion twice
sbdelay 150
sbplaystring b$,15